package r25.board;

public class RoomPosition {
	private final int posX;
	private final int posY;

	public RoomPosition(int posX, int posY) {
		super();
		this.posX = posX;
		this.posY = posY;
	}

	public int getPosX() {
		return posX;
	}

	public int getPosY() {
		return posY;
	}

	@Override
	public String toString() {
		return posX + ":" + posY;
	}

	@Override
	public int hashCode() {
		return this.toString().hashCode();
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if ((obj == null) || (this.getClass() != obj.getClass()))
			return false;

		RoomPosition ro = (RoomPosition) obj;
		return this.toString().equals(ro.toString());
	}
}
